program multipleiter
	implicit none
	integer:: i, j, k, c
	c = 0
	iter1: do i = 1, 5
		iter2: do j = 1, 5
			iter3: do k = 1, 5
				write(*,*) i, j, k, c
				c = c + 1
				if( c > 6 ) then
					exit iter1 
				end if
			end do iter3
		end do iter2
	end do iter1
end program

